﻿<navigation:Page  xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
  x:Class="PornSite.About" 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:local="clr-namespace:PornSite.Controls"
  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
  mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"  
  Style="{StaticResource PageStyle}" xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" xmlns:my="clr-namespace:PornSite.Web" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <sdk:Page.Resources>
        <CollectionViewSource x:Key="aspnet_UsersFoldersViewSource" Source="{Binding Path=Data.Folders, ElementName=aspnet_UsersDomainDataSource}" />
    </sdk:Page.Resources>
    <Grid x:Name="LayoutRoot">
        <local:BusyIndicator 
            IsBusy="{Binding ElementName=aspnet_UsersDomainDataSource, Path=IsBusy}"
            VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my:aspnet_Users, CreateList=true}" 
                                              Height="0" LoadedData="aspnet_UsersDomainDataSource_LoadedData" 
                                              Name="aspnet_UsersDomainDataSource" QueryName="GetAspnet_UsersQuery" Width="0">
                    <riaControls:DomainDataSource.DomainContext >
                        <my:DomainServicePorn/>
                    </riaControls:DomainDataSource.DomainContext>
            </riaControls:DomainDataSource>
                <StackPanel>
                    <sdk:DataGrid AutoGenerateColumns="False" Grid.ColumnSpan="2" Grid.RowSpan="2"  ItemsSource="{Binding ElementName=aspnet_UsersDomainDataSource, Path=Data}"
                                  Name="aspnet_UsersDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected" >
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn x:Name="applicationIdColumn" Binding="{Binding Path=ApplicationId}" Header="Application Id" Width="SizeToHeader" />
                            <sdk:DataGridTextColumn x:Name="creditsColumn" Binding="{Binding Path=Credits}" Header="Credits" Width="SizeToHeader" />
                            <sdk:DataGridCheckBoxColumn x:Name="isAnonymousColumn" Binding="{Binding Path=IsAnonymous}" Header="Is Anonymous" Width="SizeToHeader" />
                            <sdk:DataGridTemplateColumn x:Name="lastActivityDateColumn" Header="Last Activity Date" Width="SizeToHeader">
                                <sdk:DataGridTemplateColumn.CellEditingTemplate>
                                    <DataTemplate>
                                        <sdk:DatePicker SelectedDate="{Binding Path=LastActivityDate, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellEditingTemplate>
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Path=LastActivityDate, StringFormat=\{0:d\}}" />
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTextColumn x:Name="loweredUserNameColumn" Binding="{Binding Path=LoweredUserName}" Header="Lowered User Name" Width="SizeToHeader" />
                            <sdk:DataGridTextColumn x:Name="mobileAliasColumn" Binding="{Binding Path=MobileAlias}" Header="Mobile Alias" Width="SizeToHeader" />
                            <sdk:DataGridTextColumn x:Name="userIdColumn1" Binding="{Binding Path=UserId, Mode=OneWay}" Header="User Id" IsReadOnly="True" Width="SizeToHeader" />
                            <sdk:DataGridTextColumn x:Name="userNameColumn" Binding="{Binding Path=UserName}" Header="User Name" Width="SizeToHeader" />
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                <sdk:DataPager Height="23" HorizontalAlignment="Left"
                Name="dataPagerUsers"
                PageSize="10" VerticalAlignment="Top" Width="187"
                Source="{Binding ElementName=aspnet_UsersDomainDataSource, Path=Data}"/>
                </StackPanel>
                <StackPanel Grid.Column="1">
                <sdk:DataGrid AutoGenerateColumns="False" IsReadOnly="True"  SelectionChanged="foldersDataGrid_SelectionChanged" ItemsSource="{Binding Source={StaticResource aspnet_UsersFoldersViewSource}}" 
                              Name="foldersDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected"  >
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTextColumn x:Name="folderIdColumn" Binding="{Binding Path=FolderId, Mode=OneWay}" Header="Folder Id" IsReadOnly="True" Width="SizeToHeader" />
                        <sdk:DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Name}" Header="Name" Width="SizeToHeader" />
                        <sdk:DataGridTextColumn x:Name="userIdColumn" Binding="{Binding Path=UserId}" Header="User Id" Width="SizeToHeader" />
                    </sdk:DataGrid.Columns>    
                </sdk:DataGrid>
                    <sdk:DataPager Height="23" HorizontalAlignment="Left"
                Name="dataPagerFoplders"
                PageSize="10" VerticalAlignment="Top" Width="187"
                Source="{Binding Source={StaticResource aspnet_UsersFoldersViewSource}}"/>
                </StackPanel>
                <riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my:Photo, CreateList=true}" Height="0" 
                                              LoadedData="photoDomainDataSource_LoadedData" Name="photoDomainDataSource" QueryName="GetPhotosQuery" Width="0">
                    <riaControls:DomainDataSource.DomainContext>
                        <my:DomainServicePorn />
                    </riaControls:DomainDataSource.DomainContext>
                </riaControls:DomainDataSource>
                <telerik:RadGridView IsReadOnly="True" Grid.Column="0" Grid.Row="1"   Name="photoRadGridView" VerticalAlignment="Top" >
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding PhotoDescription}" Header="PhotoDescription"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding IsPrivate}" Header="IsPrivate"/>
                        <telerik:GridViewImageColumn DataMemberBinding="{Binding PhotoContent}" Header="Photo"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
                
            </Grid>
        </local:BusyIndicator>
    </Grid>

</navigation:Page>